1. Field of the Invention
The present invention relates to an image processing apparatus, an image processing method, a computer program, and a storage medium, adapted for use in a situation in which a similar detection process is performed in both an image capturing apparatus and an image processing apparatus, and configured to detect a specific area based on information detected in a detection process performed by the image capturing apparatus.
2. Description of the Related Art
In recent years, many image capturing apparatuses such as digital cameras or digital video cameras have become available which have a capability of detecting a subject such as a face or a total figure of a person in adjustment of an image capturing condition such as a focal length for the subject or an exposure condition, and many printing apparatuses such as a printer have become available which have a capability of performing similar processing to that performed by the image capturing apparatus to detect a subject such as a face or a person included in an input image thereby allowing a correction process to be performed depending on the subject.
For example, Japanese Patent Laid-Open No. 2004-207987 discloses a printing apparatus configured to correct an image based on image-capturing-condition information representing an image capturing condition employed by a digital camera. In the image processing method disclosed in Japanese Patent Laid-Open No. 2004-207987, image data of an image of a subject captured by a digital camera and person coordinate information indicating the location and the size of a person image relative to the total image are stored in a memory card. In a printer, the image data and the person coordinate information are read from the memory card. Based on the person coordinate information read from the memory card, the person data is corrected by performing enlargement, reduction, and/or replacement such that the image of the person has a desired size and position in a specified total image area, and printing is performed according to the corrected data.
Japanese Patent Laid-Open No. 2005-267512 discloses a method in which, in a red-eye detection process, an area, a direction, and a size in a face detection process are limited thereby achieving an increase in red-eye detection speed. In this method disclosed in Japanese Patent Laid-Open No. 2005-267512, a red eye candidate area is set as a specific area candidate, and a face detection is performed in the specific area candidate. If a face is detected, information indicating a face direction and a face size is stored as face information. When a face detection process is performed for a next specific area candidate, the direction and the size in the face detection are limited based on the stored face information. The limitation on the direction and the size in the face detection process makes it possible to perform the detection process in a short time, and leads to a reduction in probability of making an erroneous detection.
However, in the technique disclosed in Japanese Patent Laid-Open No. 2004-207987, the face detection process capability is not implemented in both a digital camera and a printer, but only in the digital camera. When an image of a subject of a person is captured by the digital camera, there is a possibility that movement of the subject occurs after the subject is detected and the focal length is adjusted. This can cause a difference to occur between the coordinate position of the subject in actually captured image data and the detected coordinate position indicated by the person coordinate information. In the case where there is a difference between the coordinate position indicated by the person coordinate information and the coordinate position in the actually captured image data, if the printer uses the person coordinate information produced by the digital camera, then a position error occurs also in corrected image data.
In the image processing method disclosed in Japanese Patent Laid-Open No. 2005-267512, the direction and the size in the face detection performed by the detection apparatus are limited based on the stored face information. However, the face detection capability is not implemented in both the digital camera and the printer. Therefore, in the technique disclosed in Japanese Patent Laid-Open No. 2005-267512, the printer is not capable of detecting the face area using the face information produced in the face detection process performed by the image capturing apparatus.
In view of the above, the present invention provides a technique to, in a case where a capability of detecting a specific area is implemented in both an external apparatus and an image processing apparatus, perform a specific area detection process in the image processing apparatus based on information detected in a detection process performed by the external apparatus thereby achieving a reduction in processing time and an increase in performance of the image processing apparatus.